home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 October / EnigmA AMIGA RUN 31 (1998)(G.R. Edizioni)(IT)[!][issue 1998-10].iso / earkit / chat / teabot / teabot.arexx < prev    next >
Text File  |  1998-09-22  |  40KB  |  43 lines

  1. /* Compressed with CompressRexx v3.0 (CMPMODE NORMAL), (C) 1993-96 Robert Hofmann */
  2. Options Results;BotCMD = '^';GetMyNick;MyNick = Result;UserHost MyNick;Hostx = Result;Ops = Result;Rand = Random(1,5,time('s'));If ~Exists("Ram:Fish") Then Do;Address command 'resident c:copy pure';Address command 'c:Copy s:fish ram:fish';Address command 'c:copy s:MCP.Gurudat ram:MCP.Gurudat';Address command 'c:copy s:jlog ram:jlog';Address command 'c:copy s:c-codes.txt ram:c-codes.txt';Address command 'c:copy s:faqlist ram:faqlist';Address command 'c:copy s:hangwords ram:hangwords';Address command 'c:copy s:hangtemp ram:hangtemp';'ECHO P='d2c(27)'b«TeaBot» Data files setup.';'ECHO P='d2c(27)'b«TeaBot» This is TeaBot the AmIRC bot.';End;RandV = '1';PingR = '1';DDir = 'Dh1:Temp/';Parse arg Cak':'Nick'!'username'@'Hosta' 'Junky'MSG 'Typeo':'Rest;If SubStr(Left(username,length(username)-(length(username)-1)),1) = '~' Then Username = Substr(left(username,length(Username)),2);If upper(cak) = 'JOIN' then Do;Joiny = '1';LevelCh();End;If upper(cak) = 'MODE' then do;parse var junky mod' 'channell' 'ty' 'nicka
  3. If upper(nick) ~= upper(mynick) & upper(Nicka) ~= Upper(mynick) & upper(ty) = '-O' then do;getchannel;chan = result;If upper(nick) = upper(Nicka) then do;"RAW NOTICE" nick ":Deop yourself, D'oh ! ;)";Exit;End;'ECHO P='d2c(27)'b«TeaBot» Ops Deop detected, no action taken.';Exit;end;if upper(nicka) = upper(mynick) & upper(ty) = '+O' then "RAW NOTICE" nick ":Thanks mate ! Hugs and kisses and other nice stuff :-)";if upper(nicka) = upper(mynick) & upper(ty) = '-O' then "RAW NOTICE" nick ":Oh I'm going to cry :~-(";Exit;End;User = Nick;Chan = Typeo;Resty = Substr(left(Rest,length(rest)-1),2);Parse upper var Resty Thingy' 'Scum;Botx = SubStr(Left(Rest,length(rest)-(length(rest)-1)),1);Scummy = Substr(Left(Scum,length(scum)-(Length(Scum)-1)),1);SVersion = d2c(2)'TeaBot'd2c(2)' 0.96BETA  (05th Feb 1998). 'd2c(2)'Aminet Release 1'd2c(2)'. This Bot is EMAILWARE, if you use or like this bot please send a email to ste@inorbit.com with comments, bug reports or anything else :)';Total = username'@'Hosta
  4. If Thingy = "PING" Then do;If PingR = '1' & Scummy ~= ' ' Then Do;If Rand = '1' Then Outp = 'Haheheh smell my finger.';If Rand = '2' Then Outp = '!!Warning Ping contains Win95 virus!!';If Rand = '3' Then Outp = 'Oo-er nice ping ! Do it again :)';If Rand = '4' Then Outp = 'Like a cup of tea ? :).';If Rand = '5' Then Outp = 'TeaBot Ping !.';"RAW NOTICE" user ":"OutP;End;Exit;end;If RandV = '1' & Thingy = 'VERSION' Then Do;"RAW NOTICE" user ":"d2c(1)"VERSION "SVersion||d2c(1);Exit;End;If Thingy = "DCC" Then do;Parse var Resty ' 'type' 'Filename' ';If type = 'CHAT' Then do;'say /rx fserv 'nick' FServ:';Exit;End;If type = 'SEND' Then do;If Exists(DDir||Filename) Then Do;"Say /Dcc Resume "User;Exit;End;"RAW NOTICE" user ":I'll have a look at the file -"Filename"- Soon. :)";"Say /Dcc get "user;Exit;End;If type = 'MOVE' Then "RAW NOTICE" user ":DCC MOVE ? You sure (this Won't auto get)";Exit;End;Parse var rest Ht'//'Address' ';Htt = Upper(ht);httx = Right(htt,5);IF httx = 'HTTP:' Then do
  5. If ~Exists("Ram:Temp") Then Do;Open(Loggy,'Ram:Temp',W);WriteLn(Loggy,"Http://members.tripod.com/~Mr_Q");Close(Loggy);End;fulladdrr = 'Http://'Address;Open(Test,"ram:temp",R);Do Until EOF(Test);MD = READLN(Test);If upper(FullAddrr) = upper(MD) Then do;Close(test);LevelCh();End;End;Open(temp,"ram:temp",A);WRITELN(Temp,FullAddrr);Close(test);close(temp);LevelCh();End;LevelCh();MainStuff: Procedure Expose Dyn MyNick Joiny Gret News Botx Blobby Chan Rest nick Typeo user username hosta Scummy Level BotCMD SVersion CL ddir systemcon;If Level = 0 Then Exit;If Botx ~= BotCMD & upper(Typeo) ~= upper(MyNick) & Joiny ~= '1' then Exit;If upper(Typeo) = upper(Mynick) & Botx ~= BotCMD Then Xest = Rest;Else Xest = Substr(left(Rest,length(rest)),2);Channels;Parse Var Result '#'TChan1'#'TChan2;Parse var Xest Commandx' 'Blobby;Command = upper(Commandx)
  6. If command = 'SHOWCOMMANDS' | Command = 'NICK' | Command = 'QUIT' | Command = 'PART' | Command = 'JOIN' | Command = 'SVIEW' | Command = 'INFO' | Command = 'LEVEL' | Command = 'HELP' | Command = 'FAQDEL' | Command = 'FAQLIST' | Command = 'URL' | Command = 'FAQADD' Then Sh = 1;Com = Upper(Blobby);TChan1 = '#'TChan1;If TChan2 ~= '' Then TChan2 = '#'TChan2;Else Chan = TChan1;If Joiny = '1' & Level > '4' Then Do;If gret ~= '' & Upper(user) ~= upper(Mynick) Then 'RAW PRIVMSG 'Chan ' :'user' 'Gret;'RAW MODE 'Chan' +o 'User;'ECHO P='d2c(27)'b«TeaBot» Tried to op user 'User;If Upper(User) = Upper(Mynick) Then 'RAW PRIVMSG 'Chan ' :TeaBots FServ is ready for access, /msg 'Mynick' fserv';Exit;End;If Joiny = '1' & level ~= '5' Then Do;If gret ~= '' & Upper(user) ~= upper(Mynick) Then 'RAW PRIVMSG 'Chan ' :'User' 'Gret;exit;End;If upper(Typeo) = upper(Mynick) & TChan2 ~= '' Then Do;Parse var Blobby TheChan' 'TheRest1;If upper(TheChan) = upper(TChan2) then kk = 1;If upper(TheChan) = upper(TChan1) Then kk = 1
  7. If kk = 'KK' & SH ~= '1' Then Do;"RAW NOTICE" nick ":I am currently on two channels you must give your command like this,";"RAW NOTICE" nick ":'/msg "MyNick" "Commandx" #TheChannel <the rest>', Messages to the channel are not affected by this.";"RAW NOTICE" nick ":I need to know which channel you want the outputed text to go to :)";Exit;End;Chan = Strip(TheChan);IF SH ~= '1' THEN Blobby = Therest1;End;If Command = 'SHOWCOMMANDS' | Command = 'COMMANDS' | Command = 'HELLO' then Showem();If Command = 'ME' Then Meem();If Command = 'NICK' Then Nickem();If Command = 'NUT' Then Nutem();If Command = 'VIEWGREET' Then ViewGreetem();If Command = 'HANG' Then Hangem();If Command = 'LEVEL' Then Levelem();If Command = 'HELP' Then Helpem();If Command = 'QUIT' Then Quitem();If Command = 'HANGR' Then HangR();If Command = 'SETGREET' | Command = 'DELGREET' Then SetGreetem();If Command = 'SLAP' | Command = 'FISH' Then Slapem();If Command = 'SVIEW' Then SViewem();If Command = 'INFO' Then Infoem()
  8. If Command = 'PUNCH' Then Punchem();If Command = 'GURU' Then Guruem();If Command = 'URL' Then Urlem();If Command = 'SAY' Then Sayem();If Command = 'CRY' Then Cryem();If Command = 'NACHOS' Then Nachosem();If Command = 'COUNTRY' Then Countryem();If Command = 'FAQ' Then Faqem();If Command = 'FAQDEL' Then Faqdelem();If Command = 'FAQLIST' Then Faqlistem();If Command = 'TOPIC' Then TOPICem();If Command = 'FAQADD' Then Faqaddem();If Command = 'PART' Then Partem();If Command = 'JOIN' Then Joinem();If Command = 'VERSION' Then Versionem();If Command = 'HUG' Then Hugem();If Command = 'OP' | Command = 'DEOP' Then OPem();If Command = 'FART' Then Fartem();If Command = 'TRYME' Then Tryme();If Command = 'FSERV' Then Do;'say /rx fserv 'nick' FServ:';Exit;End;If Command = 'TELL' | Command = 'NEWS' | Command = 'SEEN' Then Do;"RAW NOTICE" user ":Not implimented yet Sorry ! :~-|";Exit;End;If Command = 'SERVER' Then Do;GETSERVERNAME;"RAW NOTICE" user ":I am on server "Result;Exit;end;If substr(Command,2,4) = 'CTCP' Then Do
  9. "RAW NOTICE" user ":ERROR, Unknown CTCP command.";Exit;End;"RAW NOTICE" user ":Unknown command "Commandx" please check your spelling.";Exit;Hangem: Procedure Expose Level User Chan Blobby botCMD;Saveput = '';Output = '';Found = 0;tota= 0;Blobby = upper(blobby);If blobby = '' Then do;"RAW NOTICE" user ":You must give me a letter to try eg. "botcmd"hang k";Exit;End;If ~Exists("Ram:HangTemp") Then Do;"RAW NOTICE" user ":Nobody is playing Hangman, ask a operator with level 5+ to reset the game for you.";Exit;End;Open(Hangtemp,"ram:HangTemp",R);Outy= Readln(Hangtemp);Parse upper Var Outy Numbery' 'Picked' 'Nickp;If Outy = '' Then Do;"RAW NOTICE" user ":Nobody is playing Hangman, ask a operator with level 5+ to reset the game for you.";Exit;End;If nickp ~= upper(user) then do;If Nickp ~= '' Then "RAW NOTICE" user ":Sorry "Nickp" is playing, please wait your turn :-)";Exit;End;Outy= Readln(Hangtemp);SoFar = upper(Outy);If upper(blobby) = Upper(Picked) Then Do
  10. 'RAW NOTICE' user ':'Picked' is correct ! 'user' wins :-)';Exit;End;Dw = 0;Do num = 1 for length(Picked);if substr(picked,Num,1) = upper(blobby) then Do;If substr(SoFar,Num,1) = upper(blobby) then do;'RAW NOTICE' user ':'blobby' has already been found !';Exit;End;Tota = tota + 1;Output = Output||blobby;Saveput = saveput||blobby;Found = 1;Ao = 1;End;Else Do;If substr(SoFar,Num,1) ~= '-' then do;Output = Output||substr(SoFar,Num,1);Saveput = saveput||substr(SoFar,Num,1);Ao = 1;End;End;If substr(SoFar,Num,1) = '-' & ao ~= 1 then do;Output = Output||'-';Saveput = saveput||'-';DW = 1;End;Ao = 0;End;If DW =0 Then Do;'RAW NOTICE' user ':'Nickp': You win ! :-)';'RAW NOTICE' user ':'Nickp': The word was >>'Output'<<';Close(hangtemp);address command 'delete ram:hangtemp';Exit;End;If Found = 0 Then Do;'RAW NOTICE' user ':'Nickp': Doesnt contain 'Blobby;numbery = numbery - 1;If numbery = 0 then do;Close(Hangtemp);address command 'delete ram:hangtemp';'RAW NOTICE' user ':Game over !'
  11. 'RAW NOTICE' user ':The word was >>'Picked'<<';exit;End;'RAW NOTICE' user ':'Nickp': You now have 'numbery' lives.    >>'Output'<<';address command 'delete t:hangtemp';Close(hangtemp);Open(Hanga,"t:HangTemp",W);WriteLN(Hanga,numbery' 'picked' 'User);WriteLN(Hanga,Saveput);Close(Hanga);address command 'delete ram:hangtemp';address command 'copy t:hangtemp ram:hangtemp';Exit;End;'RAW NOTICE' user ':'nickp': There was 'tota' letters in the word.  >>'Output'<<   Lives left 'numbery;Close(Hangtemp);Close(Hanga);Open(Hanga,"t:HangTemp",W);WriteLN(Hanga,numbery' 'Picked' 'User);WriteLN(Hanga,Saveput);Close(Hanga);address command 'delete ram:hangtemp';address command 'copy t:hangtemp ram:hangtemp';exit;HangR: Procedure expose user Blobby Level mynick BotCMD HavePeep;If Blobby ~= '' then Do;testnick = Blobby;Call PEEPstest;If HavePeep = '0' Then do;"RAW NOTICE" user ":"d2c(2)"HangMan Error->"d2c(2)" Erk ! '"Blobby"' isn't on the channel 8-)";Exit;End;End;Else Blobby = User;Counter = 1;Output = '';If level < 5 then do
  12. "RAW NOTICE" user ":Sorry but level 5 is required reset hangman.";Exit;End;If upper(Blobby) = upper(Mynick) then do;"RAW NOTICE" user ":Don't be a plonka ;-)";Exit;End;If blobby ~= '' then do;bo = 1;address command 'delete ram:hangtemp';Open(Hangtemp,"ram:HangTemp",W);Open(Hangword,"ram:Hangwords",R);RandW = Random(1,40,time('s'));do until Counter = RandW;Wordi = ReadLn(Hangword);Counter = Counter + 1;End;"RAW NOTICE" user ":A game of hangman is setup for "blobby".";If upper(User) ~= upper(Blobby) Then "RAW NOTICE" user ":The secret word is "Wordi".";Else "RAW NOTICE" user ":Your Game is ready.... Use /Msg "MyNick" Hang <Letter>";WriteLN(HangTemp,'10 'Wordi' 'blobby);Do num = 1 for length(wordi);Output = Output||'-';End;If bo = 1 then do;WriteLN(HangTemp,Output);"RAW NOTICE" Blobby ":Your Game is ready.... Use /Msg "MyNick" Hang <Letter>";"RAW NOTICE" Blobby ":"Output;"RAW NOTICE" Blobby ":10 lives left";Exit;End;End;Exit;SetGreetem: Procedure Expose Level User Blobby Command;If level < 5 then do
  13. If Command ~= 'DELGREET' Then "RAW NOTICE" user ":Sorry but level 5 is required to add a auto greet.";Else "RAW NOTICE" user ":Sorry but level 5 is required to delete a auto greet.";Exit;End;Parse Var Blobby Therenick' 'Greet;If ThereNick = '' & Command = 'DELGREET' Then Do;"RAW NOTICE" user ":DelGreet Syntax is: DelGreet <Nick>";Exit;End;If Therenick = '' | greet = '' & Command ~= 'DELGREET' Then Do;If Command ~= 'DELGREET' Then "RAW NOTICE" user ":SetGreet Syntax is: Setgreet <Nick> <Greet>";Exit;End;Open(JSave,"ram:Greetsave",W);Open(JList,"ram:JLog",R);Do Until EOF(JList);JLine = READLN(JList);Parse Var JLine Nick' 'Adr' 'lev' ';If upper(Nick) ~= Upper(therenick) & Jline ~= '' Then WriteLN(JSave,Jline);If Upper(Nick) = upper(therenick) Then Do;If Command ~= 'DELGREET' Then WriteLN(JSave,nick' 'adr' 'Lev' 'Greet);Else WriteLN(JSave,nick' 'adr' 'Lev);Found = 1;End;End;If found = 1 then Do;If Command ~= 'DELGREET' Then "RAW NOTICE" user ":Greet ("Greet") for "therenick" added."
  14. Else "RAW NOTICE" user ":Deleted the greet for "Therenick".";Close(JSave);Close(JList);Address Command 'Copy Ram:GreetSave S:JLog';Address Command 'Copy Ram:GreetSave ram:JLog';Exit;End;Else "RAW NOTICE" user ":Couldn't find "therenick" in the database.";exit;SHOWEM: Procedure Expose Level User BotCMD Con;If level < 1 & Con ~= 'LEVELS' then do;"RAW NOTICE" user ":Sorry but level 1 is required for Showcommands.";Exit;End;If Level < 0 | Level > 6 Then "RAW NOTICE" user ":"d2c(2)"Error"d2c(2)" You must specify a level, eg "Botcmd"Help levels 3. Levels are 0 to 6.";If Level = 0 Then Do;"RAW NOTICE" user ":Level 0 the bot won't respond to any commands";Exit;End;If Level = 1 then do;"RAW NOTICE" user ": Commands available at level 1 are :";"RAW NOTICE" user ": Info   Punch   Nachos   Country";"RAW NOTICE" user ": Url   Guru   SView   Nut   Hug   FServ";"RAW NOTICE" user ": Help is available on the above commands";"RAW NOTICE" user ": By using "BotCMD"Help [Command]"
  15. "RAW NOTICE" user ":-----------------------------";Exit;End;If Level = 2 then do;"RAW NOTICE" user ": Commands available at level 2 are :";"RAW NOTICE" user ": Info   Slap   Punch   Nachos   Country";"RAW NOTICE" user ": Url   Say   Me   Fish   Guru   Faq    FaqList";"RAW NOTICE" user ": SView   Nut   Hug   Tryme   FServ";"RAW NOTICE" user ": Help is available on the above commands";"RAW NOTICE" user ": By using "BotCMD"Help [Command]";"RAW NOTICE" user ":-----------------------------";Exit;End;If Level = 3 then do;"RAW NOTICE" user ": Commands available at level 3 are :";"RAW NOTICE" user ": Info   Slap   Punch   Nachos   FaqAdd   Country";"RAW NOTICE" user ": Url   Say   Me   Fish   Guru   Faq    FaqList";"RAW NOTICE" user ": SView   Nut   Hug   Tryme   FServ";"RAW NOTICE" user ": Help is available on the above commands";"RAW NOTICE" user ": By using "BotCMD"Help [Command]";"RAW NOTICE" user ":-----------------------------";Exit;End;If Level = 4 then do
  16. "RAW NOTICE" user ": Commands available at level "Level" are :";"RAW NOTICE" user ": Info   Slap   Punch   Nachos   FaqAdd   Country";"RAW NOTICE" user ": Url   Say   Me   Fish   Guru   Faq    FaqList";"RAW NOTICE" user ": SView   Level   Part   Join   Nut   Hug   Tryme";"RAW NOTICE" user ": Topic   FServ";"RAW NOTICE" user ": Help is available on the above commands";"RAW NOTICE" user ": By using "BotCMD"Help [Command]";"RAW NOTICE" user ":-----------------------------";Exit;End;If Level = 5 then do;"RAW NOTICE" user ": Commands available at level "Level" are :";"RAW NOTICE" user ": Info   Slap   Punch   Nachos   FaqAdd   Country";"RAW NOTICE" user ": Url   Say   Me   Fish   Guru   Faq    FaqList";"RAW NOTICE" user ": SView   Level   Part   Join   Nut   Hug   Tryme";"RAW NOTICE" user ": Topic   SetGreet   DelGreet   ViewGreet   FServ";"RAW NOTICE" user ": Help is available on the above commands";"RAW NOTICE" user ": By using "BotCMD"Help [Command]";"RAW NOTICE" user ":-----------------------------";Exit;End
  17. If Level = 6 then do;"RAW NOTICE" user ": Commands available at level 6 are :";"RAW NOTICE" user ": Info   Slap   Punch   Nachos   FaqAdd   Country";"RAW NOTICE" user ": Url   Say   Me   Fish   Guru   Faq    FaqList   Nut";"RAW NOTICE" user ": SView   Level   Quit   Part   Join   Faqdel   Nick";"RAW NOTICE" user ": Hug   Fart   Tryme   Op   Deop   Topic   FServ";"RAW NOTICE" user ": SetGreet   DelGreet   ViewGreet   Hangr";"RAW NOTICE" user ": Help is available on the above commands";"RAW NOTICE" user ": By using "BotCMD"Help [Command]";Exit;End;Helpem: Procedure Expose Level User Com BotCMD MyNick;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Help.";Exit;End;"RAW NOTICE" user ":----==== Help on Commands ====----";If Com = 'GURU' Then Do;"RAW NOTICE" user ": Guru: Enter a Guru number, list isn't complete yet.";Exit;End;If Com = 'INFO' Then Do;"RAW NOTICE" user ": Info: Information on the host system.";Exit;End;If Com = 'SLAP' Then Do
  18. "RAW NOTICE" user ": Slap: Have me slap someone. "BotCMD"Slap <Nick>";Exit;End;If Com = 'PUNCH' Then Do;"RAW NOTICE" user ": Punch: Have me punch someone. "BotCMD"Punch <Nick>";Exit;End;If Com = 'NACHOS' Then Do;"RAW NOTICE" user ": Nachos: Order Nachos, tell me who to send the bill to. "BotCMD"Nachos <Nick>";Exit;End;If Com = 'URL' Then Do;"RAW NOTICE" user ": Url: This will private message you the current state of the URL database." ;Exit;End;If Com = 'SAY' Then Do;"RAW NOTICE" user ": Say: Make me talk ! "BotCMD"Say <The message>";Exit;End;If Com = 'ME' Then Do;"RAW NOTICE" user ": Me: Make me do a action. "BotCMD"Me <The message>";Exit;End;If Com = 'FISH' Then Do;"RAW NOTICE" user ": Fish: Just try :) "BotCMD"Fish <Nick>";Exit;End;If Com = 'FAQ' Then Do;"RAW NOTICE" user ": Faq: Display a Fequently added question, Use Faq <Topic>, a list of topics can be got by using the Faqlist command.";Exit;End;If Com = 'FAQADD' Then Do
  19. "RAW NOTICE" user ": Faqadd: Faqadd <Drawer> <Topic> <Faq> adds a Faq. To see Current faq drawers type "botcmd"Faqlist";Exit;End;If Com = 'COUNTRY' Then Do;"RAW NOTICE" user ": Country: Country <Code>  Converts Internet country codes into English.";Exit;End;If Com = 'FAQLIST' Then Do;"RAW NOTICE" user ": Faqlist: "botcmd"Faqlist shows the drawers in the database. "Botcmd"Faqlist <Draw> Shows the faq's in that draw.";Exit;End;If Com = 'LEVEL' Then Do;"RAW NOTICE" user ": Level: Usage "BotCMD"Level <Nick> <Level> Levels are between 0 and 6, See Levels of a discription of them.";Exit;End;If Com = 'SVIEW' Then Do;"RAW NOTICE" user ": SView: shows your current level, usage "BotCMD"SView, Level 4+ users can specify a nick eg, "BotCMD"SView <Nick> Don't forget you need level 4 for that ;) You can now use a wildcard eg "botcmd"Sview Mr*";Exit;End;If Com = '' Then Do;"RAW NOTICE" user ": Please do /Msg "MyNick" Showcommands";Exit;End;If Com = 'NUT' Then Do
  20. "RAW NOTICE" user ": Nut: Usage "BotCMD"Nut <Nick> make me headbut a irc user ;)";Exit;End;If Com = 'QUIT' Then Do;"RAW NOTICE" user ": Quit: Usage "BotCMD"Quit, makes the Bot Quit IRC.";Exit;End;If Com = 'HUG' Then Do;"RAW NOTICE" user ": Hug: Usage "BotCMD"Hug [Nick], if no nick is specifyed then I will hug the current channel :)";Exit;End;If Com = 'FART' Then Do;"RAW NOTICE" user ": Fart: Usage "BotCMD"Fart [Nick], if no nick is specifyed then I will Fart in the current channel :)";Exit;End;If Com = 'TRYME' Then Do;"RAW NOTICE" user ": Tryme: Usage "BotCMD"Tryme, play Russian roulette with the bot, it you get shot you get kicked ! ;-)";Exit;End;If Com = 'SETGREET' Then Do;"RAW NOTICE" user ": SetGreet: Usage "BotCMD"SetGreet [Nick] [Greet], lets you specify a auto greet message for a user.";Exit;End;If Com = 'DELGREET' Then Do;"RAW NOTICE" user ": Tryme: Usage "BotCMD"DelGreet [Nick], Lets you delete the auto greet for the specifyed user.";Exit;End;If Com = 'HANGR' Then Do
  21. "RAW NOTICE" user ": Hangr: Usage "BotCMD"Hangr [Nick], Lets you setup a one player game of Hangman for the nick specifyed.";Exit;End;Parse var Com Con' 'Lev;If Con = 'LEVELS' Then Do;Level = Lev;Showem();End;"RAW NOTICE" user ":Sorry there doesn't seem to be any help for the command "Com".";Exit;Opem: Procedure Expose User Level Chan Blobby Command Mynick HaveOp Testnick;If Blobby ~= '' then testnick = Blobby;Else Testnick = User;Call OPstest;If Haveop = '1' & Upper(Command) = 'OP' then do;If Blobby ~= '' then "RAW NOTICE" user ":"Blobby" already has ops !";If Blobby = '' Then "RAW NOTICE" user ":You already have ops :)";Exit;End;If Haveop = '0' & Upper(Command) = 'DEOP' then do;If Blobby ~= '' Then "RAW NOTICE" user ":"Blobby" is already Deoped.";If Blobby = '' Then "RAW NOTICE" user ":You already are deoped :)";Exit;End;If level < 4 then do;"RAW NOTICE" user ":Sorry but level 4 is required for op/deop.";Exit;End;If upper(blobby) = upper(mynick) Then do;"RAW NOTICE" user ":Not this time bud ! :-P";Exit;end
  22. If blobby ~= '' then do;If upper(command) = 'OP' Then 'RAW MODE 'Chan' +o 'blobby;else 'RAW MODE 'Chan' -o 'blobby;Exit;End;If upper(command) = 'OP' Then 'RAW MODE 'Chan' +o 'User;else 'RAW MODE 'Chan' -o 'User;Exit;ViewGreetem: Procedure Expose User Level Blobby;If level < 5 then do;"RAW NOTICE" user ":Sorry but level 5 is required for ViewGreet.";Exit;End;Open(JList,"ram:JLog",R);A = 0;Do Until EOF(JList);JLine = READLN(JList);Parse Var JLine Nicky' 'Adr' 'Lev' 'crap;If Upper(Nicky) = Upper(Blobby) & Crap ~= '' Then Do;Parse Var Adr Usern'@'Adr;If pos(Adr,'0123456789') = 0 Then Dyn='@*.'Adr;Else Dyn = '@'Adr'.*';If A = 0 Then "RAW NOTICE" user ":Greets for user "Blobby;"RAW NOTICE" user ":"Usern||dyn"  >>>>>  "Crap;A = 1;End;End;If A = 0 Then "RAW NOTICE" user ":Sorry but there isn't any Greet for user "Blobby;Exit;Topicem: Procedure Expose User Level Chan Blobby Command Mynick;If level < 4 then do;"RAW NOTICE" user ":Sorry but level 4 is required for Topic.";Exit;End;Call Opstest;If blobby = '' then do
  23. "RAW NOTICE" user ":You must tell me what you want in the topic !";Exit;end;'RAW TOPIC 'chan' :'Blobby;Exit;Nickem: Procedure Expose User Level Chan Blobby Command Mynick;If level < 5 then do;"RAW NOTICE" user ":Sorry but level 6 is required for Nick.";Exit;End;If blobby = '' then do;"RAW NOTICE" user ":You must tell me my new nick.";Exit;end;'RAW NICK :'Blobby;Exit;SViewem: Procedure Expose Level User Nick Blobby Username Dyn;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for SView.";Exit;End;If Blobby = '' Then do;"RAW NOTICE" nick ": -Mask------------Level---";aa = Right(dyn,1);If pos(aa,'0123456789') = 0 Then "RAW NOTICE" nick ":"Username"@*."Dyn"          "Level;Else "RAW NOTICE" nick ":"Username"@"Dyn".*          "Level;Exit;End;Wild = Substr(left(Blobby,length(Blobby)),length(blobby));If Wild = '*' Then Do;If Length(Blobby) >1 Then Blobby = Substr(left(blobby,length(blobby)-1),1);If Wild = '*' & Blobby = '*' Then Do;"RAW NOTICE" user ":"d2c(2)"Error"d2c(2)", Invalid wildcard !"
  24. Exit;End;End;If blobby ~= '' & Level >= 4 then do;"RAW NOTICE" nick ": -Nick----Mask------------Level---";Open(JList,"ram:JLog",R);A = 0;Do Until EOF(JList);JLine = READLN(JList);Parse Var JLine Nicky' 'Adr' 'Lev' 'crap;aa = Right(adr,1);If pos(aa,'0123456789') = 0 Then IsIt = 1;Else IsIt = 0;If Upper(Nicky) = Upper(Blobby) & Wild ~= '*' Then Do;If IsIt = 1 Then Do;Parse Var Adr Bit1'@'Bit2' 'Crap;"RAW NOTICE" nick ":"Nicky" "Bit1"@*."Bit2"         "Lev;End;Else "RAW NOTICE" nick ":"Nicky" "Adr".*         "Lev;A = 1;End;If Wild = '*' Then do;Kl = left(nicky,length(Blobby));If upper(kl) = Upper(blobby) Then do;If IsIt = 1 Then Do;Parse Var Adr Bit1'@'Bit2' 'crap;"RAW NOTICE" nick ":"Nicky" "Bit1"@*."Bit2"         "Lev;End;Else "RAW NOTICE" nick ":"Nicky" "Adr".*         "Lev;A = 1;End;End;End;If Wild = '*' & A = 0 Then "RAW NOTICE" nick ":The user `"Blobby"` (Wildcard) wasn't found in the user database.";Else If A = 0 Then "RAW NOTICE" nick ":The user `"Blobby"` wasn't found in the user database.";Exit;End
  25. Exit;Infoem: Procedure Expose Level User Systemcon Sversion;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Info.";Exit;End;"RAW NOTICE" user ":--===Infomation===--";"RAW NOTICE" user ":"SVersion;"RAW NOTICE" user ":Local time is "Time(c);"RAW NOTICE" user ":TeaBot was produced by Stephen Evans (Mr_Q)";Exit;Joinem: Procedure Expose Blobby Level User Tchan1 Tchan2;If level < 6 then do;"RAW NOTICE" user ":Sorry but level 6 is required for Join.";Exit;End;If TChan1 ~= '' & TChan2 ~= '' Then Do;"RAW NOTICE" user ":Sorry but I'm already on two channels.";Exit;End;Blobby = Strip(Blobby);"RAW NOTICE" user ":Attempting to join "Blobby;'RAW JOIN 'Blobby;Exit;Partem: Procedure Expose Blobby Level User TChan1 TChan2;If level < 6 then do;"RAW NOTICE" user ":Sorry but level 6 is required for Part.";Exit;End;If blobby = '' Then Do;"RAW NOTICE" user ":You must tell me a channel to part";Exit;End;Blobby = Strip(Blobby);"RAW NOTICE" user ":Attempting to part "Blobby;'RAW PART 'Blobby;Exit
  26. Nutem: Procedure Expose Level Blobby User Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Nut.";Exit;End;If Blobby ~= '' Then Do;'RAW PRIVMSG 'Chan ' :'d2c(1)'ACTION nuts 'Blobby's head and 'Blobby' falls to the floor in total pain while bleeding from the eyes.'d2c(1);Exit;End;Else "RAW NOTICE" user ":"d2c(2)"Error"d2c(2)", You must tell me who to nut.";Exit;Hugem: Procedure Expose Level Blobby User Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Hug.";Exit;End;If Blobby = '' Then 'RAW PRIVMSG 'Chan ' :'d2c(1)'ACTION Hugs 'Chan' init that nice ;-)'d2c(1);If Blobby ~= '' Then Do;'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION hugs 'Blobby' :-)'d2c(1);Exit;End;Exit;Fartem: Procedure Expose Level Blobby User Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Fart.";Exit;End;If Blobby ~= '' Then Do;'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION farts at 'Blobby' then watches 'Blobby's face =-) Farrrrrtttt ;-)'d2c(1);End
  27. Else 'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION farts in 'chan', wow those beans rule =-)'d2c(1);Exit;Levelem: Procedure Expose Level Blobby User Nick;If level < 6 then do;"RAW NOTICE" user ":LEVEL REQUIRES LEVEL 6 UNTIL IT'S DEBUGGED, SORRY :-)";Exit;End;if blobby = '' then DO;"RAW NOTICE" nick ":"d2c(2)"Error"d2c(2)", tell me who to change the level of.";exit;end;Parse var Blobby Nicko' 'Levelo;If levelo > '6' | levelo < '0' Then Do;"RAW NOTICE" user ":"d2c(2)"Error"d2c(2)", Incorrect level, levels are 0 to 6.";Exit;End;If levelo = '' Then Do;"RAW NOTICE" user ":"d2c(2)"Error"d2c(2)", Tell me the level to change to, levels are 0 to 6.";Exit;End;If level < '6' & levelo = '6' Then do;"RAW NOTICE" user ":"d2c(2)"Error"d2c(2)", You need level 6 to change a level past 4.";Exit;end;Open(JList,"ram:JLog",R);Open(JSave,"T:Jsave",W);Found = 0;Do Until EOF(JList);JLine = READLN(JList);Parse Var JLine Nick' 'Adr' 'Olev;If upper(Nick) ~= Upper(nicko) & Jline ~= '' Then WriteLN(JSave,Jline)
  28. If Upper(Nick) = upper(nicko) Then Do;If OLev = '6' & Level ~= '6' Then Do;"RAW NOTICE" user ":"d2c(2)"Error"d2c(2)", You need level 6 to change the level of a level 6 user.";Exit;end;"RAW NOTICE" user ": " Nicko " "Adr" Now has level "Levelo;WriteLN(JSave,nicko' 'adr' 'Levelo);Found = 1;OOLev = OLev;End;End;Close(JList);Close(JSave);If Found = 0 Then do;userhost Nicko;Fulla = Upper(RESULT);If Fulla = 'RESULT' Then Do;"RAW NOTICE" user ":Error !! " Nicko " wasn't found, check your spelling";Exit;End;aa = Right(Fulla,1);Parse Var Fulla Usern'@';If pos(aa,'0123456789') = 0 Then Parse Var Fulla '.'Fullaa' ';Else Do;Parse Var Fullaa Ag '.' Bg '.' Cg '.';Fullaa = Ag'.'Bg'.'Cg;End;Addrr = Usern'@'fullaa;Open(AList,"ram:JLog",R);Open(ASave,"T:Jsave",W);Found = 0;Do Until EOF(AList);ALine = READLN(AList);Parse Var ALine Nicko' 'Adr' 'Olev;If upper(adr) ~= Upper(addrr) & Aline ~= '' Then WriteLN(ASave,Aline);If Upper(adr) = upper(addrr) Then Do;If OLev = '5' & Level = '4' Then Do
  29. "RAW NOTICE" user ":"d2c(2)"Error"d2c(2)", You need level 5 to change the level of a level 5 user.";Exit;end;WriteLN(ASave,nicko' 'adr' 'Levelo);Found = 1;OOLev = OLev;End;End;End;Close(AList);Close(ASave);Parse Var blobby niccc' ';If Levelo = OOLev then Do;"RAW NOTICE" user ": "Nicko" already had that level !";Exit;End;If found = 0 Then do;"RAW NOTICE" user ": " Niccc " wasn't found even tried deep search !";Exit;End;Address Command 'Copy T:Jsave S:JLog';Address Command 'Copy T:Jsave ram:JLog';If addrr ~= 'ADDRR' Then "RAW NOTICE" user ":" niccc " "Addrr" Now has level "Levelo;If Levelo > OOLev then Do;"RAW NOTICE" Niccc ": "User" has increased your level to "Levelo".";End;If Levelo < OOLev then Do;"RAW NOTICE" Niccc ": "user" has lowered your level to "Levelo".";End;Exit;End;Exit;Punchem: Procedure Expose Level user Blobby Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Punch.";Exit;End;If Blobby ~= '' Then Do
  30. 'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION sees 'user' punch 'Blobby's nose and it explodes like a water melon.'d2c(1);Exit;End;Else "RAW NOTICE" user ":You must tell me who to punch";Exit;Exit;Nachosem: Procedure Expose Level user Blobby Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Nachos.";Exit;End;If Blobby = '' Then Do;'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION orders Nachos for all on 'Chan' and sends the bill to Beavis and Butthead.'d2c(1);Exit;End;Else 'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION orders Nachos for all on 'Chan' and sends the bill to 'Blobby'.'d2c(1);Exit;Cryem: Procedure Expose Level user Blobby Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Cry.";Exit;End;If Blobby ~= '' Then Do;'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION looks at 'blobby' then cries.'d2c(1);Exit;End;Else "RAW NOTICE" user ":You must tell me who to cry for.";Exit;Versionem: Procedure Expose SVersion Chan;If level < 1 then do
  31. "RAW NOTICE" user ":Sorry but level 1 is required for Version.";Exit;End;'RAW PRIVMSG 'Chan' : Version '||SVersion;Exit;Urlem: Procedure Expose Level User;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Url.";Exit;End;If ~Exists("Ram:Temp") Then Do;Open(Loggy,'Ram:Temp',W);WriteLn(Loggy,"Http://members.tripod.com/~Mr_Q");Close(Loggy);End;Open(Stuff,"Ram:Temp",R);Do until EOF(Stuff);Line = READLN(Stuff);If Line ~= '' Then "RAW NOTICE" user ":"Line;End;Exit;Sayem: Procedure Expose Level User Blobby BotCMD K Chan;If level < 2 then do;"RAW NOTICE" user ":Sorry but level 2 is required for Say.";Exit;End;K = SubStr(Blobby,1,1);If K = '!' | K = '/' | K = '+' |K = BotCMD Then Do;"RAW NOTICE" user ":That action as been recorded, have a nice day :^)";Exit;End;If Level < 5 Then 'RAW PRIVMSG 'Chan' :'d2c(2)'«'d2c(2)||User||d2c(2)'» 'd2c(2)||Blobby;Else 'RAW PRIVMSG 'Chan' :'Blobby;Exit;Meem: Procedure Expose Level User Blobby Chan;If level < 2 then do
  32. "RAW NOTICE" user ":Sorry but level 2 is required for Me.";Exit;End;If level <5 Then 'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION 'Blobby' ('User')'d2c(1);Else 'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION 'Blobby||d2c(1);Exit;Slapem: Procedure Expose Level User Blobby Command Chan;If level < 2 then do;"RAW NOTICE" user ":Sorry but level 2 is required for Fish/Slap.";Exit;End;If Blobby ~= '' Then Do;If ~Exists("ram:Fish") Then Do;"Say Fish list isn't installed, the user sucks ;)";Exit;End;FRand = Random(1,145,time('s'));Start = 1;Open(Fish,"ram:Fish",R);Do until Start = FRand;Line = READLN(Fish);Start = Start + 1;End;If command = 'FISH' Then 'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION puts a 'Line' down 'Blobby'''s pants, now you''ll smell better ;)'d2c(1);If command = 'SLAP' Then 'RAW PRIVMSG 'Chan' :'d2c(1)'ACTION slaps 'Blobby' about a bit with a 'Line'.'d2c(1);Exit;End;Else "RAW NOTICE" user ":You must give me a nick :)";Exit;Tryme: Procedure Expose Level User Chan Mynick Blobby Haveop;testnick = MyNick;Call OPstest
  33. If Haveop = '0' then do;"RAW NOTICE" user ":Sorry I don't have ops :-(  Go on op me now and play ! ;-)";Exit;End;If level < 2 then do;"RAW NOTICE" user ":Sorry but level 2 is required for Tryme.";Exit;End;If upper(blobby) = upper(mynick) Then do;"RAW NOTICE" user ":Not this time bud ! :-P";Exit;end;If level >= 6 & blobby ~= '' then User = blobby;FRand = Random(1,8,time('s'));If Frand = 3 then 'RAW KICK 'chan' 'user' : - Ha ha Wimp ! :-)';If Frand ~= 3 then 'RAW PRIVMSG 'Chan' :I point the gun at 'User' and fire, --  Click  --';Exit;Guruem: Procedure Expose Level User Blobby Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Guru.";Exit;End;If ~Exists("ram:MCP.Gurudat") Then Do;"Say Sorry Guru list doesn't seem to be installed :-(";Exit;End;If blobby = '' then do;"RAW NOTICE" user ":Give me a Guru number.";Exit;End;Blobbyy = Upper(Blobby);Open(Gurulist,"ram:MCP.Gurudat",R);Do Until EOF(Gurulist);MD = READLN(Gurulist);Parse Var MD Gurru' 'Error;If Gurru = Blobbyy Then do
  34. 'RAW PRIVMSG 'Chan' : Guru = 'Blobby' 'Error;Exit;End;End;"RAW NOTICE" user ":Guru not found.";Exit;Faqem: Procedure Expose Level Blobby User BotCMD Chan;If level < 2 then do;"RAW NOTICE" user ":Sorry but level 2 is required for Faq.";Exit;End;If Blobby = '' Then Do;"RAW NOTICE" user ":Which Faq ? Use "BotCMD"Faqlist to see them.";Exit;End;If ~Exists("S:FAQList") Then Do;Open(Loggy,'S:FAQList',W);WriteLn(Loggy,'Tea-Urn by Mr_Q 1997.');Close(Loggy);address command 'c:copy s:faqlist ram:faqlist';End;Open(FAQList,"Ram:FAQList",R);blobbyy = upper(Blobby);Do Until EOF(FAQList);MD = READLN(FAQList);Parse Var MD FAQ' 'LIST;FAQQ = Upper(FAQ);If Left(faqq,1) = '@' & Faqq = Blobbyy then do;"RAW NOTICE" user ":The requested Faq '"blobby"' appears to be a drawer !";Exit;End;If Faqq = '@'||Blobbyy then do;"RAW NOTICE" user ":Error, '"Blobby"' is a drawer not a faq !! Use "botcmd"faqlist "Blobby;Exit;End;If FAQQ = Blobbyy Then do;'RAW NOTICE 'Chan' :'d2c(2)'Faq, 'FAQ' 'd2c(2)||'  -  'LIST;Exit;End;End
  35. "RAW NOTICE" user ":The Faq "Blobby" doesn't seem to be in the database.";Exit;Faqaddem: Procedure Expose Level Blobby User;If level < 3 then do;"RAW NOTICE" user ":Sorry but level 3 is required for FaqAdd.";Exit;End;Parse Var Blobby Draw' 'Topic' 'Disc;If Draw = '' | Topic = '' | Disc = '' Then do;"RAW NOTICE" user ":Error, you haven't suppied me with the correct infomation ! Use Faqadd <Draw> <Topic> <Message> ! ";Exit;End;If Left(Topic,1) = '@' | left(draw,1) = '@' Then Do;"RAW NOTICE" user ":Error, You can't have a Topic or Draw starting with a '@'.";Exit;End;Draws = Draw;Draw = '@'Draw;NR = 0;Open(Faqlist,"Ram:faqlist",r);Open(Savelist,"T:faqtemp",w);Do Until eof(faqlist);Linea = readln(faqlist);Parse var linea Bit1' 'Bit2;Writeln(savelist,linea);If upper(Bit1) = Upper(topic) Then Do;"RAW NOTICE" user ":Sorry, the faq is already in the database!  Use Faqdel to remove it.";Exit;end;If Upper(bit1) = Upper(draw) Then Do until eof(Faqlist);Parse var linea Bit1' 'Bit2;If upper(Bit1) = Upper(topic) Then Do
  36. "RAW NOTICE" user ":Sorry, the faq is already in the database!  Use Faqdel to remove it.";Exit;end;If Nr = 0 Then Do;If Left(linea,1) = '@' | Left(linea,1) = '' Then Do;Writeln(SaveList,Topic' 'Disc);Nr = 1;End;End;If Left(linea,1) ~= '@' then Writeln(Savelist,Linea);Linea = Readln(faqlist);If left(linea,1) = '@' & linea ~= '' then writeln(savelist,linea);End;End;If Nr = 0 Then Do;Writeln(savelist,Draw);Writeln(savelist,topic' 'disc);"RAW NOTICE" user ":Made new Drawer '"Draws"' and added your faq '"topic"' to it.";Close(Savelist);Close(Faqlist);Address command 'C:Copy t:faqtemp ram:faqlist';Address command 'C:Copy t:faqtemp s:faqlist';Exit;End;Close(Savelist);Close(Faqlist);If Nr = 1 Then Do;"RAW NOTICE" user ":Added your Faq '"Topic"' into the drawer '"Draws"'";Address command 'C:Copy t:faqtemp ram:faqlist';Address command 'C:Copy t:faqtemp s:faqlist';end;Exit;Faqlistem: Procedure Expose Level Blobby User;If level < 2 then do;"RAW NOTICE" user ":Sorry but level 2 is required for Faqlist.";Exit;End
  37. TotalOut = '';Open(Faqlist,"Ram:faqlist",r);Do until eof(faqlist);Linea = readln(Faqlist);aaa = Substr(left(Linea,length(Linea)),2);If Blobby = '' Then do;"RAW NOTICE" user ":Faq drawers >:";Do until eof(faqlist);If Left(Linea,1) = '@' Then Do;Found = 1;Lineas = Linea;End;Linea = readln(faqlist);If Linea ~= '' & Found = 1 Then Totalout = totalout||Substr(left(Lineas,length(Lineas)),2)||'  ';Found = 0;If words(totalout) = 7 Then Do;"RAW NOTICE" user ":"Totalout;Totalout = '';End;End;If words(totalout) ~= 0 then "RAW NOTICE" user ":"Totalout;End;If Blobby ~= '' Then do;If Upper(aaa) = upper(Blobby) & Left(Linea,1) = '@' Then do;"RAW NOTICE" user ": "Blobby":";Do until eof(faqlist);Lineb = readln(faqlist);If Left(Lineb,1) ~= '@' Then do;Parse var Lineb Bit1' 'Rest;Totalout = Totalout||Bit1||'  ';If Words(totalout) = 7 Then Do;"RAW NOTICE" user ":"Totalout;Totalout = '';End;End;If Left(Lineb,1) = '@' Then do;If Words(totalout) ~= 0 Then Do;"RAW NOTICE" user ":"Totalout;Exit;End;exit;End;End
  38. If Words(totalout) ~= 0 Then "RAW NOTICE" user ":"Totalout;End;End;End;Faqdelem: Procedure Expose Level Blobby User;If level < 5 then do;"RAW NOTICE" user ":Sorry but level 5 is required for FaqDel.";Exit;End;A = 0;If topic = '' Then Do;"RAW NOTICE" user ":Tell me which Faq to delete.";Exit;End;Open(FAQList,"S:FAQList",R);Open(FAQSAVE,"T:FAQLIST",W);Do Until EOF(FAQList);Parse Var FaqLine Topic' ';If Upper(Topic) = upper(Blobby) Then Do;"RAW NOTICE" user ":The Faq '"Blobby"' was deleted.";A = 1;End;If Upper(Topic) ~= upper(Blobby) & Faqline ~= 'FAQLINE' Then WRITELN(FAQSAVE,FAQLINE);FAQLine = READLN(FAQList);End;Close(FAQSAVE);Close(FAQList);If A = 0 Then Do;"RAW NOTICE" user ":No Faq ("blobby") to delete.";Exit;End;Address Command 'C:Copy T:FAQLIST S:FAQLIST';Address Command 'C:Copy T:FAQLIST RAM:FAQLIST';Exit;Countryem: Procedure Expose Level Blobby User Chan;If level < 1 then do;"RAW NOTICE" user ":Sorry but level 1 is required for Country.";Exit;End;If Blobby = '' Then Do
  39. "RAW NOTICE" user ":Tell me a Country code to look up.";Exit;End;If ~Exists("ram:c-codes.txt") Then Do;"RAW NOTICE" user ":Country database file doesn't exist :(";Exit;End;C = Upper(Blobby);Open(CList,"ram:c-codes.txt",R);Do Until EOF(CList);CLine = READln(CList);Parse Var CLine CC' 'Rest;If C = CC Then do;'RAW PRIVMSG 'Chan' :'d2c(2)||Blobby||d2c(2)||' is 'rest;Exit;End;End;"RAW NOTICE" user ":The country ("Blobby") wasn't found.";Exit;Quitem: Procedure Expose Level User Chan;If level < 6 then do;"RAW NOTICE" user ":Sorry but level 6 is required for Quit.";Exit;End;Address command 'c:copy ram:jlog s:jlog';'RAW PRIVMSG 'Chan' :TeaBot terminating...';'Say /QUIT The Bot of the future !!';Exit;OPstest:;HaveOP = '0';Getusers;Peps = result;Peps = Upper(peps);Do num = 1 for words(peps);if Upper(testnick) = substr(word(peps,num),2) & substr(word(peps,num),1,1) = '@' then haveop = '1';End;Return;PEEPstest:;HavePeep = '0';Getusers;Peps = result;Peps = Upper(peps);Do num = 1 for words(peps)
  40. if Upper(testnick) = substr(word(peps,num),2) & substr(word(peps,num),1,1) = '@' then havepeep = '1';if Upper(testnick) = substr(word(peps,num),1) then havepeep = '1';End;Return;LevelCh: Procedure Expose Total Joiny Hostx Dyn MyNick Botx Blobby Chan Rest nick Typeo user username hosta Scummy Level BotCMD SVersion CL ddir systemcon;user = Nick;do;Parse var Hosta '.'Dyn' ';If ~Exists("S:JLog") Then Do;Open(Loggy,'ram:JLog',W);WriteLn(Loggy,'***TUUD1');WriteLn(Loggy,Nick' 'Username'@'Dyn' 1');Close(Loggy);MainStuff();End;aa = Right(Hosta,1);If pos(aa,'0123456789') = 0 Then Do;Parse Var Hosta '.'Dyn' ';Dynn = '*.'||Dyn;End;Else Do;Parse Var Hosta Ag '.' Bg '.' Cg '.';Dyn = Ag'.'Bg'.'Cg;Dynn = Ag'.'Bg'.'Cg'.*';End;Open(Test,"ram:JLog",R);Do Until EOF(Test);MD = READLN(Test);parse var MD Nicky' 'Usero'@'Domain' 'Level' 'Gret;If Upper(Usero) = upper(Username) & Upper(Domain) = upper(Dyn) Then Do;Close(test);MainStuff();end;End;Close(test);If Total ~= Hostx Then do;Open(temp,"ram:JLog",A)
  41. WRITELN(Temp,nick' 'username'@'dyn' 1');Close(Temp);Address command 'C:Copy ram:Jlog s:Jlog';"RAW NOTICE" nick ":Welcome, this is a beta copy of Mr_Q's bot";"RAW NOTICE" nick ":Use /msg "Mynick" Showcommands";"RAW NOTICE" nick ":You are added at level 1, ask a operator with level";"RAW NOTICE" nick ":4 or above to raise your level.";"RAW NOTICE" nick ":I won't disturb you again :) (I hope !)";'ECHO P='d2c(27)'b«TeaBot» Added user 'Nick' 'username'@'dynn;Exit;End;Else Do;Open(temp,"ram:JLog",A);WRITELN(Temp,nick' 'username'@'dyn' 6');Close(Temp);Address command 'C:Copy ram:Jlog s:Jlog';"RAW NOTICE" nick ":You are added at Level 6 ! You appear to be the Bots";"RAW NOTICE" nick ":owner, have fun !";"RAW NOTICE" nick ":Use /msg "Mynick" Showcommands";Exit;End;End
  42. /* Original script: 1620 lines, 53150 bytes, cmprate 25.7% */
  43.